From 3094b83b1f6cf1045ffa376b3392741faf5d1b61 Mon Sep 17 00:00:00 2001 From: "robertlipe@gmail.com" Date: Sat, 3 Sep 2011 21:11:20 +0000 Subject: [PATCH] Don't crash on malforemed GPX; attr isn't optional on href. git-svn-id: http://gpsbabel.googlecode.com/svn/trunk@4082 f51c46e8-681c-474f-0cfe-069cfd0219fb --- gpsbabel/gpx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gpsbabel/gpx.c b/gpsbabel/gpx.c index aa4c4fb94..06fb24ccb 100644 --- a/gpsbabel/gpx.c +++ b/gpsbabel/gpx.c @@ -666,7 +666,7 @@ gpx_start(void* data, const XML_Char* xml_el, const XML_Char** xml_attr) tag_wpt(attr); break; case tt_wpt_link: - if (0 == strcmp(attr[0], "href")) { + if (attr[0] && attr[1] && 0 == strcmp(attr[0], "href")) { link_url = attr[1]; } break; -- 2.30.2